package healthwatcher.cc.storage;

import healthwatcher.Constants;

import java.io.File;



import com.amazonaws.services.s3.model.CannedAccessControlList;
import com.amazonaws.services.s3.model.PutObjectRequest;

public class StorageAWS {
	public static void store(String code,File photo) {
		
		PutObjectRequest putRequest=new PutObjectRequest(Constants.S3BUCKET, 
				code+".jpg", photo);
		
		putRequest.setCannedAcl(CannedAccessControlList.PublicRead);
		
		System.out.println("Storage02AWS:"+System.nanoTime());
		
		Constants.getS3().putObject(putRequest);
		
		
	}
}
